﻿using Appliaction.Dto.Inv;
using Domain.Entitys.Base_Manage;
using Domain.Entitys.Inv;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.IRepositorys.Inv
{
    /// <summary>
    /// 其他入库单
    /// </summary>
    public interface IInv_othwrRepository
    {
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="searchKeyword"></param>
        /// <param name="othoutord_type"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<othwrSelectDto> GetOthwrWithDetailsAsync(
            string searchKeyword,
            string othwr_type,
            int currentPage,
            int pageSize);

        /// <summary>
        /// 查询总数
        /// </summary>
        /// <param name="searchKeyword"></param>
        /// <param name="othoutord_type"></param>
        /// <returns></returns>
        Task<int> GetTotalCountAsync(string searchKeyword, string othwr_type);



        /// <summary>
        /// 根据其他入库单编号查询其他入库单详情信息
        /// </summary>
        /// <param name="Othwr_code"></param>
        /// <returns></returns>
        Task<List<Inv_othwrproddtl>> inv_OthwrproddtlSelect(string Othwr_code);

        /// <summary>
        /// 返回数据数据字典
        /// </summary>
        /// <param name="dict_value"></param>
        /// <param name="dict_type"></param>
        /// <returns></returns>
        Task<string> dict_data_Select(string dict_value, string dict_type);


        /// <summary>
        /// 根据入库单查询入库单信息
        /// </summary>
        /// <param name="Othwr_code"></param>
        /// <returns></returns>
        Task<List<Inv_othwr>> inv_othwr_SelectWeahouse(string Othwr_code);
        /// <summary>
        /// 返回数据字子弹典
        /// </summary>
        /// <param name="Othwr_type"></param>
        /// <param name="dict_type"></param>
        /// <returns></returns>
        Task<List<Sys_Dict_Data>> inv_othwr_SelectData(string dict_value, string dict_type);


        /// <summary>
        /// 根据单据编号查询 其他入库单信息的id,来添加详情    
        /// </summary>
        /// <param name="otgwr_code"></param>
        /// <returns></returns>
        Task<int> inv_OthwrproddtlSelect_id(string otgwr_code);

        /// <summary>
        /// 查询调拨入库表
        /// </summary>
        /// <returns></returns>
        List<Inv_othwr> Inv_othwrall_trf();

        /// <summary>
        /// 查询盘点盘盈入库的信息
        /// </summary>
        /// <returns></returns>
        List<Inv_othwr> Inv_othwrall_qty();


        /// <summary>
        /// 添加主表
        /// </summary>
        /// <param name="inv_Othwr"></param>
        /// <returns></returns>
        Task<int> Inv_othwr_Insert(Inv_othwr inv_Othwr);

        /// <summary>
        /// 添加明细表的信息
        /// </summary>
        /// <param name="inv_Othwrproddtl"></param>
        /// <returns></returns>
        Task<int> Inv_othproddetails(List<Inv_othwrproddtl> entities);


        /// <summary>
        /// 删除入库单       
        /// </summary>
        /// <param name="othwr_id"></param>
        /// <returns></returns>
        Task<int> Inv_othwr_delete(int othwr_id);

        /// <summary>
        /// 修改审核状态
        /// </summary>
        /// <param name="othwr_code"></param>
        /// <param name="Othwr_audit_by"></param>
        /// <param name="Othwr_audit_time"></param>
        /// <param name="othwr_audit_statua"></param>
        /// <param name="othwr_audit_opinion"></param>
        /// <returns></returns>
        Task<int> Inv_othwr_examineUpdate(Inv_othwr inv_Othwr);

        /// <summary>
        /// 修改入库单和同一时间执行添加修改入库单详情
        /// </summary>
        /// <param name="inv_Othwr"></param>
        /// <returns></returns>
        Task<int> Inv_othwr_Update(Inv_othwr inv_Othwr, List<Inv_othwrproddtl> entities);



        /// <summary>
        /// 根据入库单号去修改入库单的状态--调拨
        /// </summary>
        /// <returns></returns>
        Task<int> Inv_othwr_Update_othwr_staus(string othwr_code);


        /// <summary>
        /// 根据入库单号去修改入库单的状态--判断,期初
        /// </summary>
        /// <param name="othwr_code"></param>
        /// <returns></returns>
        Task<int> Inv_othwr_Update_othwr_staus_pd(string othwr_code);


        
    }
}
